import type { postOrPutType } from "@/constants";
import type { IList, IResult } from "@/types/common";
import { getAxios, commonAxiosJson, deleteAxios } from "@/utils/request.js";
/* 分配投资商 地址 */
const url = "/back/investor-divide-fund";

/* 获取 分配投资商 列表信息 */
export const getInvestorDivideFundList = <T, D>(params?: D): Promise<IResult<IList<T>>> => {
  return getAxios<IList<T>, D>(url, params);
};
/* 新增，修改分配投资商信息 */
export const commonInvestorDivideFundInfo = <T, D>(params: D, type: postOrPutType): Promise<IResult<T>> => {
  return commonAxiosJson<T, D>(url, params, type);
};
/* 删除 分配投资商信息 */
export const deleteInvestorDivideFundInfo = <T, D>(params: D): Promise<IResult<T>> => {
  return deleteAxios<T, D>(url, params);
};
